/**
* @Description: WoShop商城
* @Author: 梧桐
* @Copyright: 武汉一一零七科技有限公司©版权所有
* @Link: www.s1107.com
* @Contact: QQ:2487937004
*/
<template>
	<view>
		<view class="wallet">
      <image class="moneimg":src="imgSTATICURL+'images/img/mymone.png'" ></image>
			<view class="moneybox">
				<view class="yu-e">账户余额</view>
				<view class="moneynum">￥ {{money}}</view>
			</view>
		</view>

		<view class="settled ">
      <u-button class="u-m-b-20" type="warning" @click="navigateTo('/pagesB/wallet/recharge')">充值</u-button>
      <u-button :plain="true" type="warning" @click="getBankCardinfo">提现</u-button>

		</view>


	</view>
</template>

<script>
	export default {
		onShow() {
			this.getWallet();
		},

		data() {
			return {
				imgSTATICURL:'',
				money: 0
			};
		},
    onLoad(){
      this.imgSTATICURL=this.STATICURL
    },
		methods: {
			navigateTo(url, type) {
				this.$navigateTo(url)
			},
			getWallet() {
				this.$http.getWallet().then(res => {
					if (res.status == 200) {
						this.money = res.data.price;
					}
				});
			},
			getBankCardinfo() {
				this.$http.getBankCardinfo().then(res => {
					if (res.status == 200) {
						if (res.data) {
							this.getnav("/pagesB/wallet/withdraw?type=0");
						} 
					}else {
							this.$toast("请先绑定银行卡");
							setTimeout(() => {
								this.getnav("/pagesB/moneyCartSon/Mybankcard");
							}, 1000);
					}
				});
			}
		}
	};
</script>

<style lang="scss" scoped>


	.settled {
		background-color: transparent !important;
    padding: 30upx;
	}
  .u-m-b-20{
    margin-bottom: 20upx;
  }
  .moneimg{
    margin: 0 auto;
    width:90%;
    height: 260upx;
  }
  .moneynum{
    font-size: 36upx;
    font-weight: 800;
  }
  .wallet{
    position: relative;
    text-align: center;
    .moneybox{
      position: absolute;
      top:50%;
      left: 50%;
      transform: translate(-50%,-50%);
      color: #fff;
    }
  }

</style>
